package de.mahosoftware.java.collaboration.eventmanager.client;

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;

import de.mahosoftware.java.collaboration.eventmanager.events.Eventhandlers;

public class Client {
	Eventhandlers eventhandler = null;

	public Client() {
		System.out.println("Client wurde gestartet");

		// Server-Verbindung aufbauen:
		Socket socketServer = null;
		try {
			socketServer = new Socket("localhost", 13000);
			eventhandler = new Eventhandlers(socketServer);
		} catch (UnknownHostException ex) {
			System.out
					.println("UnknownHostException bei Verbindung zu Host 'localhost', Port 13000: "
							+ ex.getMessage());
			System.exit(-1);
		} catch (IOException ex) {
			System.out
					.println("IOException bei Verbindung zu Host 'localhost', Port 13000: "
							+ ex.getMessage());
			System.exit(-1);
		}
	}

	public static void main(String[] args) {
		new Client();
	}

}
